<?php

class Annonces_model extends CI_Model {
	
	
	function __construct() {
		
		parent::__construct();
	} 
	
	function get_annonces() {
		$this->db->where("active", 1);
		$query = $this->db->get('annonces', 3);
		return $query->result();		
	}
	
	function get_annonce($id) {
		$query = $this->db->get_where('annonces', array('id' => $id));
		return $query->row();
	}
}